﻿using System;
using System.Collections.Generic;
using WebSite.ViewModels.Fields;
using WebSite.ViewModels.IndexViewModels;

namespace ControleRepresentante.UnitTests.Mocks
{
    public static class MockIndexColumns
    {
        public static Guid MockColumn = new Guid("212abf9b-3f31-4eda-a4c9-5e031e79d514");
    }

    public class MockIndexViewModel : UsuariosHolderIndexViewModel<MockModel>
    {
        private readonly List<IField> m_SearchFields;

        public MockIndexViewModel() 
            : base(null, false)
        {
            m_SearchFields = new List<IField>();
        }

        internal void AddSearchField(IField field)
        {
            m_SearchFields.Add(field);
        }

        protected override IEnumerable<IField> GetSearchFields()
        {
            List<IField> result = new List<IField>(m_SearchFields);
            result.AddRange(base.GetSearchFields());
            return result;
        }
    }
}